/**
 * 移动端路由常量定义
 */

// 基础路径
export const BASE_PATH = '/';

// 主要页面路径
export const HOME_PATH = '/';
export const GRAPHICS_TEST_PATH = '/graphics-test';
export const COLOR_TEST_PATH = '/color-test';
export const NUMBER_TEST_PATH = '/number-test';
export const LETTER_TEST_PATH = '/letter-test';
export const CHINESE_TEST_PATH = '/chinese-test';
export const CUBE_OBSERVATION_PATH = '/cube-observation';
export const CUBE_MEMORY_PATH = '/cube-memory';

// 404页面
export const NOT_FOUND_PATH = '*';

// 权限常量
export const ACCESS_PUBLIC = 'public';

// 布局类型
export const LAYOUT_MOBILE = 'mobile';

// 路由组名称
export const ROUTE_GROUP_MAIN = 'main';
export const ROUTE_GROUP_TESTS = 'tests';

// 默认重定向路径
export const DEFAULT_REDIRECT = HOME_PATH;

// 路由历史记录最大数量
export const MAX_HISTORY_COUNT = 50;

// 路由缓存键名
export const ROUTE_HISTORY_KEY = 'game_liu_route_history';

// 测试类型图标映射
export const TEST_ICONS = {
  graphics: '🎨',
  color: '🌈',
  number: '🔢',
  letter: '🔤',
  chinese: '🈶',
  cubeObservation: '🧩',
  cubeMemory: '🧠',
};

// 路由权限映射
export const ROUTE_ACCESS_MAP = {
  [HOME_PATH]: ACCESS_PUBLIC,
  [GRAPHICS_TEST_PATH]: ACCESS_PUBLIC,
  [COLOR_TEST_PATH]: ACCESS_PUBLIC,
  [NUMBER_TEST_PATH]: ACCESS_PUBLIC,
  [LETTER_TEST_PATH]: ACCESS_PUBLIC,
  [CHINESE_TEST_PATH]: ACCESS_PUBLIC,
  [CUBE_OBSERVATION_PATH]: ACCESS_PUBLIC,
  [CUBE_MEMORY_PATH]: ACCESS_PUBLIC,
};

// 需要登录验证的路径（目前所有路径都是公开的）
export const AUTH_REQUIRED_PATHS = [];

// 不需要登录验证的路径
export const AUTH_FREE_PATHS = [
  HOME_PATH,
  GRAPHICS_TEST_PATH,
  COLOR_TEST_PATH,
  NUMBER_TEST_PATH,
  LETTER_TEST_PATH,
  CHINESE_TEST_PATH,
  CUBE_OBSERVATION_PATH,
  CUBE_MEMORY_PATH,
  NOT_FOUND_PATH,
];

// 路由元信息默认值
export const DEFAULT_ROUTE_META = {
  keepAlive: false,
  affix: false,
  sort: 0,
  external: false,
  target: '_self',
};

// 页面标题配置
export const PAGE_TITLES = {
  [HOME_PATH]: '游戏测试 - Game Liu',
  [GRAPHICS_TEST_PATH]: '图形测试 - Game Liu',
  [COLOR_TEST_PATH]: '颜色测试 - Game Liu',
  [NUMBER_TEST_PATH]: '数字测试 - Game Liu',
  [LETTER_TEST_PATH]: '字母测试 - Game Liu',
  [CHINESE_TEST_PATH]: '汉字测试 - Game Liu',
  [CUBE_OBSERVATION_PATH]: '魔方与观测力 - Game Liu',
  [CUBE_MEMORY_PATH]: '魔方与记忆力 - Game Liu',
  [NOT_FOUND_PATH]: '页面不存在 - Game Liu',
};

// 页面描述配置
export const PAGE_DESCRIPTIONS = {
  [HOME_PATH]: '各种有趣的游戏测试',
  [GRAPHICS_TEST_PATH]: '测试图形识别和空间想象能力',
  [COLOR_TEST_PATH]: '测试颜色识别和色彩感知能力',
  [NUMBER_TEST_PATH]: '测试数字计算和逻辑思维能力',
  [LETTER_TEST_PATH]: '测试字母识别和语言能力',
  [CHINESE_TEST_PATH]: '测试汉字识别和中文能力',
  [CUBE_OBSERVATION_PATH]: '测试魔方观测和空间思维能力',
  [CUBE_MEMORY_PATH]: '测试魔方记忆和专注力',
  [NOT_FOUND_PATH]: '您访问的页面不存在',
};